package cn.harvest.storage.bo;

import cn.harvest.storage.dao.DAO;

public class LoginUserService {

	private DAO dao = DAO.getDAO();

	private LoginUserService() {

	}

	public static LoginUserService getService() {

		LoginUserService service = new LoginUserService();
		return service;
	}

	public boolean editOperatorPass(String newPass, String employeeId) {

		StringBuffer sql = new StringBuffer();
		sql.append(" UPDATE employee em");
		sql.append(" SET em.operator_pass = '" + newPass + "'");
		sql.append(" WHERE em.employee_id = " + employeeId);

		System.out.println("### - LoginUserService -> editOperatorPass -> #SQL \r\n	 " + sql);

		return dao.updateBySQL(sql.toString()) == 1;
	}
}
